package com.joyoung.datarespository;

import org.json.JSONObject;

/**
 * Created by Administrator on 2017\8\7 0007.
 */

public class CmsBuilder {

    private JSONObject jsonObject = new JSONObject();
    private JSONObject data = new JSONObject();

    public CmsBuilder devId(String devId) throws Exception{
        data.put("devId", devId);
        return this;
    }

    public CmsBuilder devTypeId(String devTypeId) throws Exception{
        data.put("devTypeId", devTypeId);
        return this;
    }

    public CmsBuilder start(int start) throws Exception{
        data.put("start", start);
        return this;
    }

    public CmsBuilder limit(int limit) throws Exception{
        data.put("limit", limit);
        return this;
    }

    public String build() throws Exception {
        jsonObject.put("data", data);
        return jsonObject.toString();
    }
}
